<html>

<head>
<title>Globals: Product Info</title>
<style type="text/css"><!--tt { font-size: 10pt } pre { font-size: 10pt }--></style>
</head>

<body bgcolor="#ffffff" text="#000000" link="#000080" vlink="#800000" alink="#0000ff">

<table border="0" cellpadding="0" cellspacing="0" bgcolor="#d0d0d0">
  <tr>
    <td width="120" align="left"><a href="preview.html"><img width="96" height="20" border="0"
    src="../images/navlt.gif" alt="Preview Functions"></a></td>
    <td width="96" align="left"><a href="raster.html"><img width="64" height="20" border="0"
    src="../images/navrt.gif" alt="Raster Services"></a></td>
    <td width="96" align="left"><a href="../globals.html"><img width="56" height="20"
    border="0" src="../images/navup.gif" alt="Globals"></a></td>
    <td width="288" align="right"><a href="../index.html"><img width="230" height="20"
    border="0" src="../images/proglw.gif" alt="Table of Contents"></a></td>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="600"><br>
    <h3>Product Info</h3>
    <p><small><strong>Availability</strong>&nbsp; LightWave&reg; 6.0</small><br>
    <small><strong>Component</strong>&nbsp; Layout, Modeler</small><br>
    <small><strong>Header</strong>&nbsp; <a href="../../include/lwhost.h">lwhost.h</a></small></p>
    <p>The product info global returns the product (LightWave&reg; or Inspire), its major and minor
    version numbers, and its build number. Build numbers can be used to distinguish between
    bug-fix revisions for which the major and minor version numbers weren't incremented, which
    can happen in particular when the revision only affects one platform. See also the <a
    href="../compat.html">compatibility</a> discussion.</p>
    <p><strong>Global Call</strong></p>
    <pre>   unsigned long prodinfo;
   prodinfo = ( unsigned long ) global( LWPRODUCTINFO_GLOBAL,
      GFUSE_TRANSIENT );</pre>
    <p>The global function ordinarily returns a <tt>void *</tt>, so this should be cast to an
    integer type to get the return value.</p>
    <p>The product ID is in the low four bits of the return value. The build number is in bits
    15 - 4, the minor version number is in bits 19 - 16, and the major revision number is in
    bits 23 - 20. All of these components can be extracted using macros defined in <tt>lwhost.h</tt>.</p>
    <pre>   product = prodinfo &amp; LWINF_PRODUCT;
   major = LWINF_GETMAJOR( prodinfo );
   minor = LWINF_GETMINOR( prodinfo );
   build = LWINF_GETBUILD( prodinfo );</pre>
    <p>Currently, the product can be <tt>LWINF_PRODLWAV</tt> (LightWave&reg;), <tt>LWINF_PRODINSP3D</tt>
    (Inspire), or <tt>LWINF_PRODOTHER</tt>.</td>
  </tr>
</table>
</body>
</html>
